﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="addUser.aspx.cs" Inherits="Users_addUser" %>

<%@ Register src="../UserControls/ContactSubmit.ascx" tagname="ContactSubmit" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Stylesheet" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SubNavigation" Runat="Server">
    <ul>
        <li class="first">
            <asp:HyperLink ID="lnkOverview" NavigateUrl="default.aspx" runat="server">Overview</asp:HyperLink>
        </li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageHeader" Runat="Server">
    New User Information
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" Runat="Server">
    <div style="text-align:left">
        <div class="table">
             <div class="row">
                 <div class="content">
                    <asp:Label ID="Label2" runat="server" Text="UserName"></asp:Label>
                 </div>
            </div>
           <div class="row">
                  <div class="content">
                    <asp:TextBox ID="txtUserName" CssClass = "textbox" runat="server"></asp:TextBox>
                  </div>
            </div>
            <div class="row">
                 <div class="content">
                    <asp:Label ID="Label3" runat="server" Text="Choose a password"></asp:Label>
                 </div>
            </div>
           <div class="row">
                  <div class="content">
                    <asp:TextBox ID="txtPasswordNew" CssClass = "textbox" runat="server" TextMode="Password"></asp:TextBox>
                  </div>
                  <div class="content">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ErrorMessage="(*)" ControlToValidate="txtPasswordNew" ForeColor="Red" 
                        SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                  </div>
            </div>
            <div class="row">
                <div class="content">
                    <asp:Label ID="Label4" runat="server" Text="Re-enter password"></asp:Label>
                 </div>
           </div>
           <div class="row">
                  <div class="content">
                    <asp:TextBox ID="txtRePassword" CssClass = "textbox" runat="server" TextMode="Password"></asp:TextBox>
                  </div>
                  <div class="content">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ErrorMessage="(*)" ControlToValidate="txtRePassword" ForeColor="Red" 
                        SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                     ControlToCompare="txtPasswordNew" ControlToValidate="txtRePassword" 
                     ErrorMessage="Passwords do not match." ForeColor="Red">Passwords do not match.</asp:CompareValidator>
                  </div>
            </div>
      </div>



        <div runat="server" id="divInformation" class="table"> 
            <div class="row">
                <div class="header">Name</div>
            </div>
            <div class="row">
                <div class="content" style="height: 24px">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtFirstName"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtFirstName" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                </div>
                <div class="content" style="height: 24px">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtLastName"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ErrorMessage="(*)" ControlToValidate="txtLastName" ForeColor="Red" 
                    SetFocusOnError="True"></asp:RequiredFieldValidator>
                </div>
                <div class="row" style="font-size:x-small">
                    <div class="header">First Name</div>
                    <div class="header">Last Name</div>
                </div>
            </div>
            <div class="row">
                <div class="header">Email</div>
            </div>
            <div class="row">
                <div class="content">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtEmail"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                            ErrorMessage="(*)" ControlToValidate="txtEmail" ForeColor="Red" 
                            SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ErrorMessage="Bad email address" ControlToValidate="txtEmail" ForeColor="Red" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </div>
            </div>
            <div class="row">
                <div class="header">Phone</div>
            </div>
            <div class="row">
                <div class="content">
                    <asp:TextBox runat="server" CssClass="textbox" ID="txtPhone"></asp:TextBox>
                </div>
            </div>
        </div>




        <div runat="server" id="divRoleType" class="table">
            <div class="row">
                <div class="header"><b>Select Control Panel Role</b><hr /></div>
                <div style="clear: both;">
                    <asp:Repeater ID="rptRole" runat="server">
                        <HeaderTemplate>
                            <ul>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                <asp:HiddenField ID="hdnRoleId" Value='<%#Eval("Id") %>' runat="server" />
                                <div class="row"><asp:CheckBox ID="chkRole" CssClass="textbox"  runat="server" Text='<%# " <b>" + Eval("Name") + "</b> - " + Eval("Description") %>' /></div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </div>
            <div class="row">
                <div class="header"><b>Select Server Role</b><hr /></div>
                <div style="clear: both;">
                    <asp:Repeater ID="rptServerRole" runat="server">
                        <HeaderTemplate>
                            <ul>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <li>
                                <asp:HiddenField ID="hdnRoleId" Value='<%#Eval("Id") %>' runat="server" />
                                <div class="row"><asp:CheckBox ID="chkServerRole" CssClass="textbox"  runat="server" Text='<%# " <b>" + Eval("Name") + "</b> - " + Eval("Description") %>' /></div>
                            </li>
                        </ItemTemplate>
                        <FooterTemplate>
                            </ul>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </div>
        </div>



     <ul>
        <li>
            <asp:Button ID="btAddUser" runat="server" Text="Add User" 
                onclick="btAddUser_Click" /> &nbsp;or 
            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="default.aspx">Cancel</asp:HyperLink>
                    </li>
    </ul>
    <br />
    <br />        
   </div> 
</asp:Content>

